Keep-It-Up Classic

 Keeping Applications up-and-running

Basic Configuration

Configuring KIU is really simple. If you launch KIU for the first time, it will create a folder called "KIU StartUp Items" in the System's Preferences folder. There's also a "KIU WebLaunch Items" folder and a "KIU WebLog Items" folder, which are described in the remote management section below.

folders
 

If you put an alias of an application in the "KIU StartUp Items" folder, or one or more aliases of documents belonging to the application, KIU will "monitor" this application ("monitored application") and relaunch it if it (unexpectedly) quits, re-opening the documents. KIU can check up to 75 aliases. Don't put both an alias to an application and aliases to documents of that application in the KIU Items.

Note:  if the target for the alias is a packaged application, you need to create the alias in a different way: control-click on the application package and select "Show package contents". Inside the package, you should find an alias to the actual application. Make a copy of this alias and put it inside the correct KIU Items folder. Next control-click on the application package again and select "Hide package contents".

KIU will launch all aliases in alphabetical order, which allows you to influence the launch order. Multiple documents belonging to the same application should be in close alphabetical proximity if you want to be able to predict launch order.

If the name of an alias in the KIU folder ends with a ".1" (e.g. myserverapp.1), this application will be kept in front of all other applications . This improves the performance of the selected application.

After you put an alias in the "KIU StartUp Items", you need to quit and relaunch Keep-It-Up, in order for KIU to notice the changes in the folder.

All you still have to do, is put an alias of KIU in the System's "Startup Items" folder. At startup, KIU will be launched, and KIU will launch the "monitored applications", opening the selected documents. Do not put an alias to an application in both the "KIU StartUp Items" and the System's "StartUp Items", because to function most efficiently, KIU must be allowed to launch the applications.

While KIU is running, it will put up a small window:

 window


This window is only there because the Mac OS likes to quit applications that have no windows open in case of low memory conditions. This little window prevents Keep-It-Up from being quit.

Trouble getting things to work ? Check the KIU log file for error messages or consult the KIU FAQ for additional help.

Keep-It-Up preferences

The preferences dialog offers several options:

General Options

 
general options

 
KIU is often used for Macs that are accessible by the general public to ensure that certain applications (e.g. a demo, kiosks, ..) keep running even if the user quits them. By using a password, you can prevent KIU itself from being quit. If you enable "Ask password on quit", KIU will refuse to quit unless a correct password is supplied. On restart/shutdown, this password is not needed.

You can also protect the preferences dialog using the same password.

Delay Options

delay options


Activate KIU after ... minutes of time

If one of the "monitored applications" is no longer running, because it "unexpectedly quit" or because the user quit it, KIU will attempt to relaunch this application and open any documents that were in the "KIU StartUp Items" folder.

As a consequence, when you're sitting at your computer, you would never be able to quit such an app, because it would be relaunched immediately. To avoid this, KIU will not become active until a certain time has elapsed in which the user performed no keyboard/mouse interaction. This time is user configurable.

Launch each app with a delay of ... seconds
 
After launching an application, KIU will delay the launch of the next application by a certain amount of time.  If you have 2 applications A and B which depend on each other and you need to make sure A is fully initialized before B is launched, increasing this delay will do the trick.

Delay before restart

KIU can restart your Mac (see below).The Mac will wait for this period before it actually restarts the computer, putting up a notice and sounding a voice alert to warn anybody sitting at the computer that a restart is imminent. You can now still quit KIU to prevent the restart.

Relaunch & Restart

relaunch and restart

 

KIU will relaunch each individual application only a limited number of times,to avoid getting into an endless relauching loop if an application crashes over and over again. You can set this limit as high as you want. When the limit is exceeded, KIU can either:  

Restart Method: 

There are 2 restart methods, both having specific advantages and disadvantages:

Clean Restart:
Forced Restart
First all applications are terminated, then the computer is restarted. Unfortunately, if an application puts up a dialog when asked to quit, it can block the restart process indefinitely. To avoid this situation, you should install Okey Dokey which automatically dismisses dialogs after a certain time period (see KIU FAQ ).  If you use Okey Dokey, you must set the Okey Dokey activation time to less than 60 seconds. Sadly, Okey Dokey doesn't work for all types of dialog.
First an attempt is made to terminate all applications, but after the given time period KIU will proceed with the restart, even if one or more applications have not yet terminated. You should set this time period high enough to give all applications ample time to quit (recommended: 120-240 seconds). If you use Okey Dokey, set the Okey Dokey activation time sufficiently low compared to the forced restart period (e.g. 30 seconds, never higher than 60 seconds)
Advantages: this is a safe way to restart without any data loss
Advantages: always works, even if some application doesn't quit. This ensures your Mac always restarts and becomes available again. If availability of your server is very important, select this method.
Disadvantages: the restart may get blocked, probably leaving your server in an undesirable state.
Disadvantages: some unsaved data may be lost from the application which did not quit.


The restart happens in 5 phases:

• phase 0: KIU notifies anybody sitting at the computer that a restart is in progress.
• phase 1: KIU asks all applications to quit and waits 10 seconds
• phase 2: (optional, only if some apps did not quit yet). Every minute, KIU will ask each remaining application to quit. As a side effect, your Mac may beep every minute. Fase 2 lasts until all applications have quit (Clean Restart) or for the given time period (Forced Restart).
• phase 3: KIU terminates the finder and also writes the names of any remaining applications to the KIU log file
• phase 4: KIU umounts all disks and restarts the computer.

Notice that once that phase 1 has begun, the restart can only be stopped by quitting KIU.

Log File


KIU always keeps a log file of all relaunches, restarts, errors, etc... If you have any trouble with KIU, always check the log file for clues.

You will find this "KIU logfile" in the Preferences Folder. You can view this log file by selecting "Open Log File" from the file menu. This will launch BBEdit and open the log file, so you must have BBEdit on your harddisk.
If you want to use another text editor, create a file using your favorite text editor and use exactly the same name as the original logfile. Now replace the original logfile with the one you just created.

Schedule

When you select "Schedule" from the File menu, you can specify 2 scheduling options:

 schedule


First of all you can set KIU to disable any application relaunching during 2 periods of the day. Check the appropriate checkbox to activate this option. Set the periods by clicking on the 'begin' and 'end' time displays (00:00 in the boxes). You can reset a period by setting the begin time equal to the end time

Secondary, you can also tell KIU to restart the computer on a regular time basis. You may have all kinds of reasons to do this, e.g. because sometimes your server becomes too slow if it isn't restarted from time to time. Check the appropriate checkbox to activate this option. Set the days of the week on which you want the computer to be restarted and click on the "at 00:00 " time display to set the correct hour.


Note: the restart will not happen if:
               * the computer is not "idle" at the time of restart because somebody is using the Mac.
               * other applications do not give KIU processing time at restart time.